package coml.jiyun.hp.day14_17and20.presenter;

import coml.jiyun.hp.day14_17and20.bean.BannerBean;
import coml.jiyun.hp.day14_17and20.callback.BannerCallBack;
import coml.jiyun.hp.day14_17and20.model.ImpBannerModel;
import coml.jiyun.hp.day14_17and20.view.BannView;

public class ImpBannerPresenter implements BannerPresenter, BannerCallBack {

    private ImpBannerModel impBannerModel;
    private BannView bannView;

    public ImpBannerPresenter(ImpBannerModel impBannerModel, BannView bannView) {
        this.impBannerModel = impBannerModel;
        this.bannView = bannView;
    }

    @Override
    public void getData() {
        impBannerModel.getData(this);
    }

    @Override
    public void onSuccess(BannerBean bannerBean) {
        bannView.onSuccess(bannerBean);
    }

    @Override
    public void onFail(String str) {
        bannView.onFail(str);
    }
}
